package com.liusy.common;

import org.apache.log4j.Logger;

import com.liusy.taskengine.executemodel.AbstractExecuteModel;



/**
 * 对像操作帮助类
 * 
 * @author liusy 2012-12-14
 */
public class ClassHelp {
	
	private static Logger log = Logger.getLogger(ClassHelp.class);
	
	
	public static  Object newObjectInstance(String classPath,Class [] agrsClass,Object... agrs)
	{
		Object obj = null;
		try {
			Class <?> classType = Class.forName(classPath);
			obj = classType.getConstructor(agrsClass).newInstance(agrs);
		} catch (Exception e) {
			log.error(e.getMessage());
			e.printStackTrace();
		}
		return obj;

	}
}
